﻿<%@ Page Language="C#" MasterPageFile="~/Design/MasterPage/MasterPage.master" AutoEventWireup="true" CodeFile="HealthVisitPlanSrhForm.aspx.cs" Inherits="App_Input_HealthVisitingPlanSrhForm" Title="家访计划维护" EnableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script>
  
 function buildChange(object)
    {
     CommonAjaxUtils.FindFloor(object.value,get_floor_Result_CallBack);
     CommonAjaxUtils.FindRoom(object.value,"",get_room_Result_CallBack);

    }
    
    function floorChange(object)
    {
         var objBuildNo= window.document.getElementById('<%=dropBuildNo.ClientID %>')
         CommonAjaxUtils.FindRoom(objBuildNo.value,object.value,get_room_Result_CallBack);
    }
    function get_floor_Result_CallBack(response)
            {
                if (response.value != null)
                {                    
 
                    var drop = window.document.getElementById('<%=dropFloor.ClientID %>');
                    drop.length=0;　　　　            
　　　　            var ds = response.value;
                    if(ds != null && typeof(ds) == "object")
                    {                   
　　　　　　                drop.options.add(new Option("",""));
                        for(var i=0; i<ds.length; i++)
　　　　                {
　　　　       
　　　　　　                var name=ds[i].Floor;
　　　　　　                var id=ds[i].Floor;
　　　　　　                drop.options.add(new Option(name,id));
　　　　                }                
                    }
                }
                return
            }
            
            function get_room_Result_CallBack(response)
            {
                if (response.value != null)
                {                    
 
                    var drop = window.document.getElementById('<%=dropRoomNo.ClientID %>');
                    drop.length=0;　　　　            
　　　　            var ds = response.value;
                    if(ds != null && typeof(ds) == "object")
                    {                   
　　　　　　                drop.options.add(new Option("",""));
                        for(var i=0; i<ds.length; i++)
　　　　                {
　　　　       
　　　　　　                var name=ds[i].ApartmentNo;
　　　　　　                var id=ds[i].ApartmentNo;
　　　　　　                drop.options.add(new Option(name,id));
　　　　                }                
                    }
                }
                return
            }
</script>

    &nbsp;<div id="tableResult">
        <table width="100%">
            <tr>
                <td colspan="7" style="height: 15px">
                <script language="javascript">
                                        (new TitleBar('SearchBar', '治疗计划列表')).showBar();
                            </script>
                </td>
            </tr>
            <tr>
                <td style="height: 15px" colspan="7">
                </td>
            </tr>
            <tr>
                <td style="width: 248px">
                </td>
                <td style="width: 62px">
                    <asp:Label ID="memberId" runat="server" Text="会员编号："></asp:Label></td>
                <td style="width: 206px">
                    <asp:TextBox ID="txtMemberNo" runat="server" MaxLength="100" Width="86px"></asp:TextBox>
                    <asp:TextBox ID="txtMemberName" runat="server" BackColor="#E0E0E0" BorderColor="#E0E0E0"
                        contentEditable="false" ForeColor="Black" Width="89px"></asp:TextBox><a href="#" onclick="javascript:popupMemberSearch('<%=txtMemberNo.ClientID%>', '<%=txtMemberName.ClientID %>' );">
                    <img id="searchImg" runat="server" border="0" src="../../images/search.jpg" /></a>
                    </td>
                <td align="left" style="width: 81px; height: 24px">
                    <asp:Label ID="Label1" runat="server" Text="预定访问日期："></asp:Label></td>
                <td align="left" style="height: 24px; width: 212px;">
                    <asp:TextBox ID="txtBeginDate" runat="server" MaxLength="6" onfocus="new Calendar(1900,2015,0,null).show(this);"
                        Width="89px"></asp:TextBox>
                    ~
                    <asp:TextBox ID="txtEndDate" runat="server" MaxLength="6" onfocus="new Calendar(1900,2015,0,null).show(this);"
                        Width="89px"></asp:TextBox></td>
                <td style="width: 63px">
                    <asp:Label ID="label2" Text="性别：" runat="server"></asp:Label></td>
                 <td>
                     &nbsp;<asp:DropDownList ID="sex" runat="server"  DataTextField="Content" DataValueField="DictNo" >
                    </asp:DropDownList></td>
            </tr>
            <tr>
                <td align="center" colspan="7" style="height: 10px">
                </td>
            </tr>
            <tr>
                <td style="width: 248px">
                </td>
                <td style="width: 62px">
                    <asp:Label ID="Label3" runat="server" Text="楼号："></asp:Label>
                    </td>
                <td align="left" style="width: 206px">
                    <asp:DropDownList ID="dropBuildNo" runat="server" DataTextField="BuildingNo"
                                        DataValueField="BuildingNo" CausesValidation="True" Width="76px" onchange="buildChange(this)">
                                    </asp:DropDownList></td>
                <td style="width: 81px">
                <asp:Label ID="Label4" runat="server" Text="楼层："></asp:Label></td>
                <td style="width: 212px">
                    <asp:DropDownList ID="dropFloor" runat="server" DataTextField="Floor" DataValueField="Floor"
                                        Width="76px" onchange="floorChange(this)">
                            </asp:DropDownList></td>
                <td style="width: 63px">
                <asp:Label ID="Label5" runat="server" Text="房间编号："></asp:Label></td>
                <td>
                    &nbsp;<asp:DropDownList ID="dropRoomNo" runat="server" DataTextField="ApartmentNo" DataValueField="ApartmentNo"
                                        Width="76px" onchange="">
                            </asp:DropDownList></td>
            </tr>
            <tr>
                <td align="center" colspan="7" style="height: 20px">
                </td>
            </tr>
            <tr>
                <td align="center" colspan="7">
                    &nbsp;<asp:Button ID="btnSeach" runat="server" CssClass="button" OnClick="btnSeach_Click"
                        Text="检 索" Width="60px" />
                    &nbsp;&nbsp;
                </td>
            </tr>
      </table>
      <table width="100%">
            <tr>
                <td align="center">
                </td>
            </tr>
            <tr>
                <td align="left" >
                <script language="javascript">
                                        (new TitleBar('SearchBar', '检索信息')).showBar();
                            </script>
                </td>
            </tr>
            <tr>
                <td align="center">
                </td>
            </tr>
            <tr>
            </tr>
            <tr>
                <td>
                    
                    <asp:GridView ID="viewSrhRst" runat="server" AllowPaging="True"
                        AutoGenerateColumns="False" CssClass="GridView_table" DataKeyNames="MemberNo,VisitingId"
                        OnRowCommand="viewSrhRst_RowCommand" OnPageIndexChanging="viewSrhRst_PageIndexChanging"
                        OnRowDataBound="viewSrhRst_RowDataBound" BorderStyle="Solid" BorderWidth="3px" EnableViewState="False">
                        <Columns>
                            <asp:BoundField HeaderText="家访编号" DataField="VisitingId" Visible = False>
                                <HeaderStyle  CssClass="GridView_head_grayblue" />
                                <ItemStyle CssClass="GridView_item_left" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="会员编号">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("MemberNo") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemStyle CssClass="GridView_item_left" />
                                <HeaderStyle CssClass="GridView_head_grayblue" Width="10%" />
                                <ItemTemplate>
                                    <asp:HyperLink ID="hypeMemberNo"  runat="server" href="#"  Text='<%# Bind("MemberNo") %>' ></asp:HyperLink> 
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="姓名" DataField="MemberName">
                                <ItemStyle CssClass="GridView_item_left" />
                                <HeaderStyle Width="10%" CssClass="GridView_head_grayblue" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="性别" DataField="MemberSex">
                                <ItemStyle CssClass="GridView_item_center" />
                                <HeaderStyle Width="5%" CssClass="GridView_head_grayblue" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="联系电话" DataField="MemberTel">
                                <HeaderStyle Width="15%" CssClass="GridView_head_grayblue" />
                                <ItemStyle CssClass="GridView_item_left" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="房间编号" DataField="ApartmentNo">
                                <HeaderStyle Width="10%" CssClass="GridView_head_grayblue" />
                                <ItemStyle CssClass="GridView_item_center" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="会员状态" DataField="MemberStatusC">
                                <HeaderStyle Width="10%" CssClass="GridView_head_grayblue" />
                                <ItemStyle CssClass="GridView_item_center" />
                            </asp:BoundField>                            
                            <asp:BoundField HeaderText="家访类别" DataField="VisitingTypeC">
                                <HeaderStyle Width="10%" CssClass="GridView_head_grayblue" />
                                <ItemStyle CssClass="GridView_item_center" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="预定访问日期" DataField="BespokeDate" DataFormatString="{0:yyyy/MM/dd}" HtmlEncode = False>
                                <HeaderStyle Width="10%" CssClass="GridView_head_grayblue" />
                                <ItemStyle CssClass="GridView_item_center" />
                            </asp:BoundField>                            
                            <asp:BoundField HeaderText="预定访问时间" DataField="BespokeTime">
                                <HeaderStyle Width="10%" CssClass="GridView_head_grayblue" />
                                <ItemStyle CssClass="GridView_item_center" />
                            </asp:BoundField>                                                        
                            <asp:ButtonField ButtonType="Image" CommandName="Plan" HeaderText="计划" 
                                ImageUrl="~/images/in.gif">
                                <ItemStyle CssClass="GridView_item_center" />
                                <HeaderStyle Width="5%" CssClass="GridView_head_grayblue" />
                            </asp:ButtonField>
                            <asp:ButtonField ButtonType="Image" CommandName="Details" HeaderText="详细"
                                ImageUrl="~/images/info.gif">
                                <ItemStyle CssClass="GridView_item_center" />
                                <HeaderStyle CssClass="GridView_head_grayblue" />
                            </asp:ButtonField>
                        </Columns>
                        <PagerSettings Mode="NumericFirstLast" />
                        <PagerStyle HorizontalAlign="Right" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        
    </div>
</asp:Content>
